The WV_CWT function returns the one-dimensional continuous wavelet transform of the input array. The transform is done using a user-inputted wavelet function.
Result = WV_CWT(Array, Family, Order [, /DOUBLE] [, DSCALE=scalar] [, NSCALE=scalar] [, /PAD] [, SCALE=variable] [, START_SCALE=scalar])
The result is a two-dimensional array of type complex or double complex, containing the continuous wavelet transform of the input Array.
A one-dimensional array of length N, of floating-point or complex type.
A scalar string giving the name of the wavelet function to use for the transform.
The order number, or parameter, for the wavelet function given by Family.
Set this keyword to force the computation to be done in double-precision arithmetic.
Set this keyword to a scalar value giving the spacing between scale values, in logarithmic units. The default is 0.25, which gives four subscales within each major scale.
Set this keyword to a scalar value giving the total number of scale values to use for the wavelet transform. The default is [log2(N/START_SCALE)]/DSCALE+1.
Set this keyword to force Array to be padded with zeroes before computing the transform. Enough zeroes are added to make the total length of Array equal to the next-higher power-of-two greater than 2N. Padding with zeroes prevents wraparound of the Array and speeds up the fast Fourier transform.
Note: Padding with zeroes reduces, but does not eliminate, edge effects caused by the discontinuities at the start and end of the data.
Set this keyword to a named variable in which to return the scale values used for the continuous wavelet transform. The SCALE values range from START_SCALE up to START_SCALE·2^[(NSCALE–1)DSCALE].
Set this keyword to a scalar value giving the starting scale, in non-dimensional units. The default is 2, which gives a starting scale that is twice the spacing between Array elements.
Torrence and Compo, 1998: A Practical Guide to Wavelet Analysis. Bull. Amer. Meteor. Soc., 79, 61–78.
; Assume we have monthly random data.
n = 500
dt = 1d/12 ; time sampling
seed = 999
data = RANDOMN(seed, n)
time = 1960 + dt*FINDGEN(n)
; Compute the wavelet transform and the power.
wave = WV_CWT(data, 'Morlet', 6, /PAD, SCALE=scales)
wavePower = ABS(wave^2)
; Convert scales to time units.
scales *= dt
; Contour visualization.
ICONTOUR, wavePower, time, scales, /Y_LOG, YRANGE=[20,0.25], $
C_VALUE=FINDGEN(7)+1, $
/FILL, RGB_TABLE=39, $
YTITLE='Scale (years)', $
VIEW_TITLE='Wavelet Power'
; Insert a legend.
tool = IGETCURRENT(TOOL=oTool)
void = oTool->DoAction('Operations/Insert/Legend')
5.4 |
Introduced |